package Text0511;

public class MidStudent extends Student{

    {
        System.out.println("这是Mid子类构造代码块");
    }

    public MidStudent(String name,int age,String ID){
        this.name = name;
        this.age = age;
        this.ID = ID;
        System.out.println("Mid子类构造方法");
    }

    public MidStudent() {
        this.name = null;
        this.age = 0;
        this.ID = null;
        System.out.println("Mid子类构造方法");
    }

    public void show(){
        System.out.println("MidStudent name:" + name + " age:" + age + " ID:" + ID);
    }

    public void showAll(){
        System.out.println("MidStudent name:" + name + " age:" + age + " ID:" + ID + " math:" + math);
    }

    public void showIDNumber(){
        System.out.println(name + "的" + "IDNumber:" + getIDNumber());
    }

    public void setIN(double goal){
        math = goal;
        System.out.println("MidStudent math:" + math);
    }

    public void setINAll(String name, int age, String ID, double math){
        this.name = name;
        this.age = age;
        this.ID = ID;
        this.math = math;
        System.out.println("修改后的MidStudent");
    }

    public void showStatic(){
        System.out.println(sta);
    }

    public void changeSta(){
        sta = "新静态变量";
    }
}
